<!--头部-->
<include file="Index:header" />

<!--左侧菜单-->
<div class="col-md-2" id="left-menu">
    <ul class="nav nav-pills nav-stacked">
        <li style="display:none;" role="presentation"  class="active"  ><a href="__APP__/"><i class="glyphicon glyphicon-home"></i>控制台</a></li>
        <li role="presentation" ><a href="__APP__/Capacity/learnstyles"><i class="glyphicon glyphicon-warning-sign"></i>学习风格</a></li>
        <li style="display:none;" role="presentation" ><a href="__APP__/Capacity/potential"><i class="glyphicon glyphicon-warning-sign"></i>多元潜能</a></li>
    </ul>
</div>
<!--内容块-->
<div class="col-md-10" id="contents">
    <div class="alert alert-danger" role="alert">
        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <p>为了保障您账户的安全，请修改密码 !</p>
    </div>
    <div class="alert alert-success" role="alert">
        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <p>杨哲，欢迎登陆文华学院能力测试系统 !</p>
    </div>

    <div class="student-info">
        <p class="block-title">个人资料</p>
        <ul>
            <li class="col-md-5 col-md-offset-1"><label for="">姓名：</label><span>杨哲</span></li>
            <li class="col-md-5 col-md-offset-1"><label for="">学号：</label><span>120171021329</span></li>
            <li class="col-md-5 col-md-offset-1"><label for="">性别：</label><span>男</span></li>
            <li class="col-md-5 col-md-offset-1"><label for="">出生日期：</label><span>1970年01月01</span></li>
            <li class="col-md-5 col-md-offset-1"><label for="">政治面貌：</label><span>共青团员</span></li>
            <li class="col-md-5 col-md-offset-1"><label for="">民族：</label><span>汉族</span></li>
            <!--<li class="col-md-5 col-md-offset-1"><label for="">籍贯：</label><span>湖北省</span></li>-->
            <li class="col-md-5 col-md-offset-1"><label for="">学院学部：</label><span>信息科学与技术学部</span></li>
            <li class="col-md-5 col-md-offset-1"><label for="">专业：</label><span>计算机应用技术(专)</span></li>
            <li class="col-md-5 col-md-offset-1"><label for="">年级：</label><span>2012届</span></li>
            <li class="col-md-5 col-md-offset-1"><label for="">学制：</label><span>3年</span></li>
        </ul>
        <div class="clearfix"></div>

    </div>

</div>

<!--底部-->
<include file="Index:footer" />
<script>
    $(function () {
        $('.btn-cgpassword-confirm').click(function () {
            var oldpassword = $('#oldpassword').val();
            var password = $('#password').val();
            var repassword = $('#repassword').val();
            if (oldpassword == '' || password == '') {
                swal("密码修改失败", "密码不能为空 !", "error");
                return false;
            }

            if (password.length < 8) {
                swal("密码修改失败", "密码长度不能少于8位 !", "error");
                return false;
            }

            if (password != repassword) {
                swal("密码修改失败", "两次密码不一致 !", "error");
                return false;
            }
            $.post('/student/api/changepassword?is_refer=0', {
                oldpassword: oldpassword,
                password: password,
                repassword: repassword
            }, function (result) {
                if (result.code == 0) {
                    $('#changeScretModal').modal('hide');
                    swal("密码修改成功!", "", "success");
                } else {
                    swal("密码修改失败", result.msg, "error");
                    return false;
                }
            })
        });
    })
</script>
</html>